package component;

public class Person {
    private String name;
    private int age;
    private int id;

    public Person(String name,int age,int id){
        this.name = name;
        this.age = age;
        this.id = id;
    }
    public Person() {
        this("NULL", 0, 0); // 这里假设默认姓名，年龄和编号为0，可根据实际需求调整
    }
    public void getName(){
        System.out.println(name);
    }
    public void getAge(){
        System.out.println(age);
    }
    public void getId(){
        System.out.println(id);
    }
}
//用户 类 账号  密码
class User extends Person{
    protected int account;
    protected int password;
    public int setAccount(int account){
        this.account = account;
        return account;
    }

    public int setPassword(int password){
        this.password = password;
        return password;
    }
}
//医生 类 级别 科室
class Doctor extends Person{
    private String doctorRank;
    private String department;

}